/*
    www.cguage.com
    3.1 求子集 思路:二进制1011001
*/

#include <iostream>
#include <sstream>
#include <cassert>
#include <vector>
#include <bitset>
using namespace std;

#ifndef TEST
#define IN(iss) {                       \
        std::string str;                \
        std::getline(std::cin, str);    \
        iss.str(str);                   \
    }
#define OUT(s) std::cout << s
#endif

#define READ_N(iss, n) {    \
    iss >> n;               \
    iss.ignore(1, ',');     \
}

int main() {
    istringstream iss;
    ostringstream oss;

    int n = 4;
    oss << "_";
    for (int i = 0; i <= ((1 << n) - 1); ++i) {
        for (int j = 0; j < 4; ++j) {
            if (i & (1 << j)) {
                oss << j + 1;
            }
        }
        oss << ",";
    }

    string str = oss.str();
    str.erase(str.end() - 1);
    OUT(str);
    return 0;
}

#ifdef TEST
struct TestCase CASES[] = {
};
#endif